<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'orderselect.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="css/common.css">

  </head>
  
  <body>
    <div class="centerdiv">
    	<table class="tablestyle" >
    		<tr class="title_font">
    			<td colspan="7">所有客户订单</td>
    		</tr>
    		<tr class="table_title">
    			<th>收货人</th>
    			<th>下单时间</th>
    			<th>送货时间</th>
    			<th>总费用</th>
    			<th>是否已发送</th>
    			<th>是否已结算</th>
    			<th>处理</th>
    		</tr>
    		<s:if test="%{size==0}">
    			<td colspan="7">没有订单</td>
    		</s:if>
    		<s:else>
    			<s:iterator value="%{orderList}">
    				<tr align="center">
    					<td><s:property value="username"/></td>
    					<td><s:property value="submitTime" /></td>
    					<td>
    						<s:if test="%{consignmentDate==null}">还没发送</s:if>
    						<s:else><s:property value="consignmentDate"/></s:else>
    					</td>
    					<td><s:property value="totalFee"/></td>
    					<td>
	    					<s:if test="%{isSend==0}">
	    						<input type="checkbox" onclick="location.href='jsp_admin_ordersend?orderId='+<s:property value='orderId' />"/>发送
	    					</s:if>
	    					<s:else>已发送</s:else>
    					</td>
    					<td>
    						<s:if test="%{isPayoff==0}">
    							<input type="checkbox" onclick="location.href='jsp_admin_orderpayoff?orderId='+<s:property value='orderId' />"/>未付款
    						</s:if>
    						<s:else>已付款</s:else>
    					</td>
    					<td>
    						<a href="jsp_admin_orderdetail?orderId=<s:property value='orderId' />">详情</a>
    						<a href="jsp_admin_orderdelete?orderId=<s:property value='orderId' />">删除</a>
    					</td>
    				</tr>
    			</s:iterator>
    		</s:else>
    	</table>
    </div>
  </body>
</html>
